package com.fr.report.cellElement.core;

import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLReadable;
import com.fr.base.xml.XMLableReader;
import java.io.Serializable;

public class SelectCount
  implements XMLReadable, Serializable, Cloneable
{
  public static final int TOP = 1;
  public static final int BOTTOM = 2;
  public static final int ODD = 3;
  public static final int EVEN = 4;
  public static final int SPECIFY = 5;
  private int type = 1;
  private String formulaCount = null;
  private String serial = null;

  public int getType()
  {
    return this.type;
  }

  public void setType(int paramInt)
  {
    this.type = paramInt;
  }

  public String getFormulaCount()
  {
    return this.formulaCount;
  }

  public void setFormulaCount(String paramString)
  {
    this.formulaCount = paramString;
  }

  public String getSerial()
  {
    return this.serial;
  }

  public void setSerial(String paramString)
  {
    this.serial = paramString;
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    return super.clone();
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    if (paramXMLableReader.isAttr())
    {
      String str;
      if ((str = paramXMLableReader.getAttr("type")) != null)
        setType(Integer.parseInt(str));
      if ((str = paramXMLableReader.getAttr("count")) != null)
        setFormulaCount(str);
      if ((str = paramXMLableReader.getAttr("serial")) != null)
        setSerial(str);
    }
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    paramXMLPrintWriter.startTAG("SelectCount");
    if (this.type != 1)
      paramXMLPrintWriter.attr("type", this.type);
    if (this.formulaCount != null)
      paramXMLPrintWriter.attr("count", this.formulaCount);
    if (this.serial != null)
      paramXMLPrintWriter.attr("serial", this.serial);
    paramXMLPrintWriter.end();
  }
}